package com.jsu.springboot_crop.dao;

import com.jsu.springboot_crop.entity.Knowledge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface KnowledgeDao {
    //查询所有农业知识
    List<Knowledge> selectAll();
    //条件查询农业知识
    List<Knowledge> selectAllByKeys(@Param("keys")String keys);
    //根据id查询农业知识
    Knowledge selectByPrimaryKey(Integer id);
    //查询个人农业知识
    List<Knowledge>selectByExample(@Param("name")String name);
    //增加农业知识
    int insertSelective(Knowledge knowledge);
    //修改农业知识
    int updateByPrimaryKeySelective(Knowledge knowledge);
    //删除农业知识
    int deleteByPrimaryKey(Integer id);
}

